<!DOCTYPE html>
<html lang="en">
<head>
  <base href="<%= APP_BASE %>">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><%= APP_TITLE %></title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- inject:css -->
  <!-- endinject -->
</head>
<body>

  <sd-app>Loading...</sd-app>

  <script>
  // function.name (all IE)
  // Remove once https://github.com/angular/angular/issues/6501 is fixed.
  /*! @source http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie*/
  if (!Object.hasOwnProperty('name')) {
    Object.defineProperty(Function.prototype, 'name', {
      get: function() {
        var matches = this.toString().match(/^\s*function\s*(\S*)\s*\(/);
        var name = matches && matches.length > 1 ? matches[1] : "";
        // For better performance only parse once, and then cache the
        // result through a new accessor for repeated access.
        Object.defineProperty(this, 'name', {value: name});
        return name;
      }
    });
  }
  </script>

  <script>
  // Fixes undefined module function in SystemJS bundle
  function module() {}
  </script>

  <!-- shims:js -->
  <!-- endinject -->

  <% if (ENV === 'dev') { %>
  <script>System.config(<%= JSON.stringify(SYSTEM_CONFIG) %>)</script>
  <% } %>

  <!-- libs:js -->
  <!-- endinject -->

  <!-- inject:js -->
  <!-- endinject -->

  <% if (ENV === 'dev') { %>
  <script>
  System.import('<%= BOOTSTRAP_MODULE %>')
    .catch(function (e) {
      console.error(e,
        'Report this error at https://github.com/mgechev/angular2-seed/issues');
    });
  </script>
  <% } %>

</body>
</html>
